﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ListNetRanker
{
    class DotMultiply
    {

	public static double dotMutply(double[] f1, List<Double> f2)
	{
		if (f1.Length != f2.Count)
		{
			throw new Exception("The length of two vectors is different");
		}
		
		double sum = 0.0;
		for (int i=0; i<f1.Length; i++)
		{
			sum += f1[i]*f2[i];
		}
		
		return sum;
	}
	public static double dotMutply(double[] f1, double[] f2)
	{
		if (f1.Length != f2.Length)
		{
			throw new Exception("The length of two vectors is different");
		}
		
		double sum = 0.0;
		for (int i=0; i<f1.Length; i++)
		{
			sum += f1[i]*f2[i];
		}
		
		return sum;
	}
    }
}
